package main

import (
	"hwanginsitein/network"
	"github.com/garyburd/redigo/redis"
)

func Login(user string,password string) bool{
	defer network.TryCatch()
	keyPrefix := "web:chatroom:"
	var redisPool = network.InitRedis()
	var redisConn = network.Conn(redisPool)
	passwd,_ := redis.String(redisConn.Do("get",keyPrefix+user))
	if passwd == password {
		return true
	}
	return false
}
